﻿using Clothes.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Clothes.IDAL
{
    public interface CLLoginIDAL : BaseIDAL<CLLogin>
    {
        /// <summary>
        /// 判断用户名是否存在
        /// </summary>
        /// <param name="Name">用户名</param>
        /// <returns></returns>
        bool LoginName(string Name);

        /// <summary>
        /// 判断手机号是否存在
        /// </summary>
        /// <param name="Number">手机好</param>
        /// <returns></returns>
        bool LoginNumber(string Number);

        /// <summary>
        /// 通过用户名查找登录信息
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <returns></returns>
        CLLogin FindByUserName(string userName);

        /// <summary>
        /// 通过手机号查找登录信息
        /// </summary>
        /// <param name="mobileNumber">手机号</param>
        /// <returns></returns>
        CLLogin FindByMobileNumber(string mobileNumber);

        /// <summary>
        /// 根据手机号和密码查找信息
        /// </summary>
        /// <param name="mobileNumber"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        CLLogin Select(string mobileNumber, string password);

        /// <summary>
        /// 根据姓名和密码查找信息
        /// </summary>
        /// <param name="mobileNumber"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        CLLogin SelectSource(string UserName, string password);
    }
}
